import http from '../http'
// import { SMART_HOMEWORK } from '../host'

// 阅卷系统接口域名
const EXAMINATION_API = `https://api.ebag.readboy.com/examination-single-school`
// 作业系统线上接口域名
const SMART_HOMEWORK = 'https://api.ebag.readboy.com/smart-homework'

/**
 * 获取学年枚举
 */
export function getSchoolYear(params) {
  return http.get(`${EXAMINATION_API}/v1/academic/timetype`, {
    params: params
  })
}

/**
 * 获取年级学情-学情总结
 */
export function getGradeSummary(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/summary`, {
    params: params
  })
}

/**
 * 年级学情-班级综合对比
 */
export function getGradeComparison(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/comparison`, {
    params: params
  })
}

/**
 * 年级学情-知识点分析
 */
export function getGradeKnowledgeList(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/knowledge-analyze`, {
    params: params
  })
}

/**
 * 年级学情-各班知识点掌握情况
 */
export function getClassKnowledgeList(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/class-knowledge`, {
    params
  })
}

/**
 * 年级学情-等级分布
 */
export function getGradeLevel(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/level`, {
    params: params
  })
}

/**
 * 获取学生列表
 */
export function getStudentsList(params) {
  return http.get(`${SMART_HOMEWORK}/v1/group/group/student-all`, {
    params: params
  })
}

/**
 * 获取班级总结
 */
export function getClassSummary(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/summary`, {
    params: params
  })
}

/**
 * 班级学情-成绩趋势
 */
export function getClassTrends(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/trend`, {
    params: params
  })
}

/**
 * 班级学情-知识点分析
 */
export function getClassKnowledgePointList(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/knowledge-analyze`, {
    params: params
  })
}

/**
 * 班级学情-等级分布
 */
export function getClassLevel(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/level`, {
    params: params
  })
}

/**
 * 班级学情-学生表现
 */
export function getStudentPerformance(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/student-expression`, {
    params: params
  })
}

/**
 * 班级学情-学情总结
 */
export function getStudentSummary(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/student/summary`, {
    params: params
  })
}

/**
 * 学生学情-作业趋势
 */
export function getHomeworkTrends(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/student/trend`, {
    params: params
  })
}

/**
 * 学生学情-知识点分析
 */
export function getStudentKnowledge(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/student/knowledge-analyze`, {
    params: params
  })
}

/**
 * 学生学情-核心素养
 */
export function getStudentCore(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/student/ability`, {
    params: params
  })
}
/**
 * 班级学情-核心素养
 */
export function getClassCore(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/ability`, {
    params: params
  })
}

/**
 * 年级学情-各班知识点掌握情况-详情
 */
export function getKnowledgeDetail(params) {
  return http.get(
    `${SMART_HOMEWORK}/v1/situation/grade/class-knowledge/detail`,
    {
      params: params
    }
  )
}

/**
 * 根据作业ID获取作业信息
 */
export function getHomeworkInfo(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/class/homework-info`, {
    params: params
  })
}

/**
 * 共性错题 年级学情，若传入class_id则为班级学情
 */
export function getCommonMistakes(params) {
  return http.get(`${SMART_HOMEWORK}/v1/situation/grade/wrong-from`, {
    params: params
  })
}
